package com.cyj.dream.rabbitmq.config;

import lombok.Data;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Description: rabbitmq配置--自定义消息对象：RabbitMqConfig
 * @BelongsProject: DreamChardonnay
 * @BelongsPackage: com.cyj.dream.rabbitmq.config
 * @Author: ChenYongJia
 * @CreateTime: 2021-10-19 13:29
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
@Data
@ToString
@Component
public class RabbitMqConfig {
    /**
     * 服务器域名或IP
     */
    @Value("${spring.rabbitmq.host}")
    private String host;

    /**
     * 端口，默认5672
     */
    @Value("${spring.rabbitmq.port}")
    private int port;

    /**
     * 用户名，默认guest
     */
    @Value("${spring.rabbitmq.username}")
    private String username;

    /**
     * 用户密码，默认guest
     */
    @Value("${spring.rabbitmq.password}")
    private String password;

    /**
     * 虚拟目录，默认/
     */
    private String virtualHost = "/";

}

